﻿namespace PoemGame.Query
{
    public interface IGamePlayRecordQuery
    {
        /// <summary>
        /// 根据游戏Id获取游戏记录
        /// </summary>
        /// <param name="gameId"></param>
        /// <returns></returns>
        Task<IEnumerable<GamePlayRecordRes>> GetRecordsByGameAsync(Guid gameId);
        /// <summary>
        /// 根据玩家获取记录
        /// </summary>
        /// <param name="playerId"></param>
        /// <returns></returns>
        Task<IEnumerable<GamePlayRecordRes>> GetRecordsByPlayerAsync(Guid playerId);
        /// <summary>
        /// 根据条件获取游戏记录
        /// </summary>
        /// <param name="wherecondition"></param>
        /// <param name="orderby"></param>
        /// <returns></returns>
        Task<IEnumerable<GamePlayRecordRes>> GetRecordsByConditionAsync(
            string wherecondition
            );
        /// <summary>
        /// 根据条件获取分页的游戏记录
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="wherecondition"></param>
        /// <returns></returns>
        Task<IEnumerable<GamePlayRecordRes>> GetPagedRecordsByConditionAsync(
            int pageindex,
            int pagesize,
            string wherecondition,
            string orderby);
        /// <summary>
        /// 根据条件获取游戏记录数
        /// </summary>
        /// <param name="wherecondition"></param>
        /// <returns></returns>
        Task<long> GetRecordsCountByConditionAsync(string wherecondition);
    }
}
